|
The pill jar puzzle is a probability puzzle, which asks the expected value of the number of half-pills remaining when the last whole pill is popped from a jar initially containing whole pills and the way to proceed is by removing a pill from the bottle at random. If the pill removed is a whole pill, it is broken into two half pills. One half pill is consumed and the other one is returned to the jar. If the pill removed is a half pill, then it is simply consumed and nothing is returned to the jar. ==Mathematical derivation== The problem becomes very easy to solve once a binary variable ''X''''k'' defined as ''X''''k'' = 1, if the ''k''th half pill remains inside the jar after the all the whole pills are removed. The ''k''th half pill is defined as the result of the breaking of the ''k''th whole pill being removed from the jar. ''X''''k'' = 1 if out of the ''n'' − ''k'' + 1 pills (''n'' − ''k'' whole pills + ''k''th half pill), the one half pill is removed at the very end. This occurs with probability 1/(''n'' − ''k'' + 1). The expected value is then given by, E(''X''1) + E(''X''2) + ... + E(''X''''n''). Since E(''X''''k'') = P(''X''''k'' = 1) = 1/(''n'' − ''k'' + 1), the sought expected value is 1/''n'' + 1/(''n'' − 1) + 1/(''n'' − 2) + ... + 1 = ''H''''n'' (the ''n''th harmonic number). 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Pill puzzle」の詳細全文を読む スポンサード リンク
|